<template>
  <BasicTable :columns="columns"></BasicTable>
</template>
<script setup lang="ts">
import BasicTable from "../../components/Table/BasicTable.vue";
import { baseColumns } from "./columns";
const openUserModal = (cord: any) => {
  console.log("变价", cord);
};
const openUpdatePasswordModal = (cord: any) => {
  console.log("改密");
};
const columns = [
  ...baseColumns,
  {
    title: "Action",
    key: "action",
    actions: ({ text, cord}:any) => [
      {
        label: "编辑",
        onClick: () => openUserModal(cord),
      },
      {
        label: "改密",
        auth: "sys.user.password",
        onClick: () => openUpdatePasswordModal(cord),
      },
    ],
  },
];
</script>
